<template>
	<el-drawer title="会议纪要详情" v-model="visible" :size="800" destroy-on-close @closed="$emit('closed')">
		<el-container v-loading="loading">
			<el-main>
				<el-form>
					<el-form-item label="纪要标题">
						<span style="font-weight: 600;font-size: 16px">{{form.notesTitle}}</span>
					</el-form-item>
					<el-form-item label="纪要人">
						<div style="width: 100%;">
							<el-avatar :src="form.avatar" size="small" style="margin-top: 5px;"></el-avatar>
							<span style="position: absolute;margin-left: 15px">{{form.createUserName}}</span>
							<span style="float: right">
								<div>
									<el-icon style="margin-right: 10px;"><el-icon-clock/></el-icon>{{form.createTime}}
								</div>
							</span>
						</div>
					</el-form-item>
					<el-form-item label="会议主题">
						<span style="font-weight: 600;font-size: 16px">{{form.subject}}</span>
					</el-form-item>
					<el-form-item label="纪要内容">
						<div v-html="form.content"></div>
					</el-form-item>
					<el-form-item label="纪要附件" v-if="form.attachId!=''">
						<attach-menu :attachIds="form.attachId" :roleFlag="form.attachRole" :preview="true"></attach-menu>
					</el-form-item>
				</el-form>
				<el-footer style="text-align: center;">
					<el-button @click="visible=false">关闭</el-button>
				</el-footer>
			</el-main>
		</el-container>
	</el-drawer>
</template>

<script>
import AttachMenu from '@/views/module/attachMenu'
export default {
	emits: ['success', 'closed'],
	components: {
		AttachMenu,
	},
	data() {
		return {
			loading: false,
			form: {
				notesId: '',
				subject:'',
				notesTitle: '',
				meetingId: '',
				attachRole: '',
				createUserName:'',
				content: '',
				msgType: '',
				attachId: '',
				createTime:''
			},
			model:"rece",
			visible: false,
			isSaveing: false,
		}
	},
	mounted() {

	},
	methods: {
		//显示
		open(model){
			this.model=model;
			this.visible = true;
			return this;
		},
		//表单注入数据
		setData(data){
			this.form.roomName = data.roomName
			this.form.subject = data.subject
			this.form.notesTitle=data.notesTitle
			this.form.content=data.content
			this.form.attachId=data.attachId
			this.form.createUserName=data.createUserName
			this.form.avatar=data.avatar
			this.form.attachRole = data.attachRole
			this.form.createTime=data.createTime
		},
	}
}
</script>

<style>
</style>
